import Mock from 'mockjs'

//模拟接口，接口地址/info，返回数据是{code:1,msg:'success'}
Mock.mock('/info', {
    code: 1,
    msg: 'success',
})

Mock.mock('/articles', {
    rows: [
        {
            isCheck: false,
            id: 4,
            title: "水浒传",
            label: "忠义",
            author: "施耐庵"
        },
        {
            isCheck: false,
            id: 2,
            title: "三国演义",
            label: "战争",
            author: "罗贯中"
        },
        {
            isCheck: false,
            id: 1,
            title: "西游记",
            label: "神魔",
            author: "吴承恩"
        },
        {
            isCheck: false,
            id: 5,
            title: "红楼梦",
            label: "爱情",
            author: "曹雪芹"
        },
        {
            isCheck: false,
            id: 3,
            title: "资治通鉴",
            label: "民间故事",
            author: "未知"
        }
    ]
})

Mock.mock('/articles1', {
    'rows|10': [{
        'id': '@guid',
        'title': '@ctitle',
        'lable': '',
        'author': '@cname',
        isCheck: false
    }]
})